package redlib.backend.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import redlib.backend.annotation.NeedNoPrivilege;
import redlib.backend.dto.TestDTO;
import redlib.backend.service.TestService;

@RestController
@RequestMapping("/api/test")
public class TestController {
    @Autowired
    private TestService testService;

    @PostMapping ("addRecord")
    @NeedNoPrivilege
    public void addRecord(@RequestBody TestDTO testDTO){
        testService.insert(testDTO);
    }
}
